package com.ruibang.glass.produce.feign;

import com.ruibang.glass.common.domain.material.*;
import com.teaming.cloud.framework2.common.model.ResultBody;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("glass-material")
@Component
public interface MaterialApi {
    @GetMapping("/api/glass/material/management/getOne/{id}")
    @ApiOperation(value = "查询", response = ResultBody.class)
    ResultBody<MaterialManagement> getById(@PathVariable("id") String id);

    @PostMapping("/api/material/cksq/out/bound/manage/addYclList")
    @ApiOperation(value = "原材料出库申请", response = ResultBody.class)
    ResultBody addMaterialYClOutboundManagement(@RequestBody MaterialALLOutboundManagement materialALLOutboundManagement);

    @GetMapping("/api/material/line/ware/house/get/warehouse/itemList")
    @ApiOperation(value = "获取所有物品库位编码", response = ResultBody.class)
    ResultBody<List<WareHouseInfoDTO>> getLocationItemList();

    @GetMapping("/api/material/all/inventory/management/getYclMaterialList")
    @ApiOperation(value = "原材料下拉", response = ResultBody.class)
    ResultBody<List<MaterialALLInventoryManagementDTO>> getYclMaterialList();

    @PostMapping("/api/material/all/inventory/management/updateFrozenQuantity")
    @ApiOperation(value = "原材料领料数量冻结", response = ResultBody.class)
    ResultBody updateFrozenQuantity(@RequestBody List<MaterialALLInventoryManagementReq> materialALLInventoryManagementReqList);

    @PostMapping("/api/material/all/inventory/management/removeFrozenQuantity")
    @ApiOperation(value = "原材料移出冻结数量", response = ResultBody.class)
    ResultBody removeFrozenQuantity(@RequestBody List<MaterialALLInventoryManagementReq> materialALLInventoryManagementReqList);
}
